<template>
	<view>
		<my-header :title="title" :back="true"></my-header>
		<view class="title">{{item.projectName}}</view>
		<uni-card class="card1">		
			<uni-section title="申报条件" type="line">
				<view v-html="item.requirements"></view>
				<!-- {{item.requirements}} -->
			</uni-section>
		</uni-card>
		<uni-card class="card2">
			<uni-section title="咨询电话" type="line">
				<view v-html="item.contact"></view>
			</uni-section>
		</uni-card>
	</view>
</template>

<script>
	import MyHeader from '@/components/header.vue'
	export default {
		components: {
			MyHeader,
		},
		data() {
			return {
				title: '政策导览',
				id: '',
				item: {
					// contact: '双凤镇经济发展局（招商）0512-53438919',
					// projectName: "企业加大投资项目",
					// requirements: "对年生产设备投资 500 万元以上（不含税）的航空航天企业。"
				}
			}
		},
		created() {
			this.init()
		},
		onLoad(options) {
			console.log(options)
			this.id = options.id
		},
		methods: {
			init() {
				uni.request({
					url: '/sf_enterprise_service/business/anonpolicy/view/' + this.id,
					method: 'GET',
					success: (res) => {		
						console.log(res, 'res??')
						this.item = res.data.data
						this.item.contact = this.item.contact.replace(/;/g, '<br>')
						this.item.contact = this.item.contact.replace(/；/g, '<br>')
						console.log(this.item)
					},
					complete: () => {							
						uni.hideLoading();
					}
				})
			},
		}
	}
</script>

<style scoped>
.title {
	text-align: center;
	font-weight: bold;
	margin-top: 60px;
	padding: 20px 0;
}
.card1 {
	border-top: 4px solid 	#1E90FF;
}
.card2 {
	border-bottom: 4px solid 	#1E90FF;
}
</style>

